﻿<!-- "script/ide/System/test/test_pe_gridview.html" 
Author:LiXizhi
Date: 2008.5.15
-->
<pe:mcml>
<script type="text/npl" refresh="false">
<![CDATA[
    function newDataSource()
        local nodes = Page:jquery("pe:gridview");
        local node = nodes[1];

        local t = {
            {username="LiXizhi_test", Company="ParaEngine"},
            {username="Andy_test", Company="ParaEngine"},
            {username="Gandhi_test", Company="PE"},
            {username="ParaEngine_test", Company="PE"},
            {username="ParaEngine1", Company="PE"},
            {username="ParaEngine2", Company="PE"},
            {username="ParaEngine3", Company="PE"},
            {username="ParaEngine4", Company="PE"},
            {username="ParaEngine5", Company="PE"},
            {username="ParaEngine6", Company="PE"},
            {username="ParaEngine7", Company="PE"},
            {username="ParaEngine8", Company="PE"},
            {username="ParaEngine9", Company="PE"},
        };

        node:resetDataSource(t);
        --node:DataBind();
    end
]]>
</script>
<div style="background-color:#ff0000;margin:10px;padding:10px;min-width:200px;min-height:150px;">
    <!--<div style="float:left;margin-left:30px;margin-top:30px;">
        test gridview
    </div>-->
    
    <input type="button" value="testSetDataSource" onclick="newDataSource"/>
    <pe:gridview style="margin:10px;" name="gvwTableTest" CellPadding="5" AllowPaging="true" DefaultNodeHeight="40" pagesize="6"
                 DataSource='<%={{username="111111111111"}, {username="111111111111", Company="ParaEngine"},{username="111111111111"}, {username="111111111111", Company="ParaEngine"},{username="111111111111"}, {username="111111111111", Company="ParaEngine"}}%>'>
        <Columns>
            Row index is<%=Eval("index")%>User Name is<%=Eval("username")%> Company: <%=Eval("Company")%>
        </Columns>
        <EmptyDataTemplate>
            <b>NO MATCHING USER IS FOUND 没有找到符合要求的用户</b>
        </EmptyDataTemplate>
        <PagerSettings Position="TopAndBottom" height="26" PreviousPageText="previous page" NextPageText="next page" />
        <PagerTemplate><form><input type="button" name="pre" value="previous page"/><input type="button" name="next" value="next page"/><label name="page" style="height:18px;margin:4px"/></form></PagerTemplate>
    </pe:gridview>
</div>

</pe:mcml>